package com.linkrenhe.frame.http;

import android.graphics.Bitmap;
public class HttpBitmapResponse extends HttpResponse {
	
	/**
	 *  libx264	mp4	480x320	700k	libfaac	128k	48k
	 */
	public static final String STYLE_NAME_VIDEO_HIGHT = "android_high";
	/**
	 *   libx264	mp4	480x320	96k		libfaac	64k		48k
	 */
	public static final String STYLE_NAME_VIDEO_LOW = "android_low";
	/**
	 *   libx264	mp4	480x320	512k	libfaac	128k	48k
	 */
	public static final String STYLE_NAME_VIDEO_NORMAL = "android";
	/**
	 * bitmap
	 */
	private Bitmap mBitmap;
	private String mImagePath;
	protected HttpBitmapResponse(int state, HttpRequest httpRequest) {
		super(state, httpRequest);
	}
	protected HttpBitmapResponse(int state, HttpRequest httpRequest,
			Bitmap bitmap,String imagePath) {
		super(state, httpRequest);
		this.mBitmap =  bitmap;
		this.mImagePath = imagePath;
	}
	public Bitmap getBitmap() {
		return mBitmap;
	}
	public String getImageLocalPath() {
		return mImagePath;
	}
	
	


	@Override
	public String toString() {
		if(getStateCode()==STATE_SUCCESS){
			return "-----------"+mImagePath;
		}else{
			return "---";
		}
	}

	@Override
	public HttpResponse createSameResponse(HttpRequest httpRequest) {
		return new HttpBitmapResponse(getStateCode(), httpRequest, mBitmap, mImagePath);
	}
}
